package com.bw.dao;

import com.bw.bean.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MovieDao {
    @Select("select m.*,d.`name`,d.pwd from t_director d,t_movie m where d.id=m.did")
    List<Movie> getList1();

    @Select("select m.*,d.`name`,d.pwd from t_director d,t_movie m where d.id=m.did and instr(m.mname,#{mname})")
    List<Movie> getList2(String mname);

    @Select("select m.*,d.`name`,d.pwd from t_director d,t_movie m where d.id=m.did")
    List<Movie> getList3();

    @Select("select m.*,d.`name`,d.pwd from t_director d,t_movie m where d.id=m.did and d.name=#{name}")
    List<Movie> getList4(String name);
}
